rr # Libraries library(ggplot2) library(dplyr) library(forcats) library(ggpubr) library(cowplot)
rr mynamestheme <- theme_bw()+ theme(plot.title = element_text(family = , face = , size = (25)), legend.title = element_text(colour = , face = , family = ,size = (20)), legend.text = element_text(face = , colour=,family = ,size = (18) ), axis.title = element_text(family = , face = ,size = (20), colour = ), axis.text = element_text(family = ,face = , colour = , size = (18)))
rr #P value correction #AZM and Placebo at all visits Aitchison only
pa<-c(0.76, 0.001,0.07) p.adjust(pa, method=, n=length(pa)) #[1] 0.760 0.003 0.140
#P value correction #AZM and Placebo at all visits Bray-Curtis only
pb<-c(0.97, 0.001,0.10) p.adjust(pb, method=, n=length(pb)) #[1] 0.970 0.003 0.200
#Baseline
rr newdat0<-read.csv(/t0fg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE) colnames(newdat0) str(newdat0)
newdat0\(Group <- recode_factor(newdat0\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat0)
p values
rr pvla0 <- data.frame( group1 = \1, group2 = \3, label = *p = 0.76, y.position = 140 )
rr ba0<-ggplot(newdat0, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+mynamestheme+stat_pvalue_manual(pvla0, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba0
#Baseline - Bray-Curtis
rr newdat0b<-read.csv(/t0fg_bray1.csv.csv, stringsAsFactors = TRUE) colnames(newdat0b) str(newdat0b)
newdat0b\(Group <- recode_factor(newdat0b\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat0b)
p values
rr pvla0b <- data.frame( group1 = \1, group2 = \3, label = *p = 0.97, y.position = 1.08 )
rr ba0b<-ggplot(newdat0b, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 1.2))+ labs( x=NULL, y=-Curtis distance)+mynamestheme+stat_pvalue_manual(pvla0b, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba0b
rr #Combine the two plots m1<-cowplot::plot_grid(ba0, ba0b, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m1
#Week 48
rr newdat12<-read.csv(/t12fg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE) colnames(newdat12) str(newdat12)
newdat12\(Group <- recode_factor(newdat12\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat12)
p values
rr pvla12 <- data.frame( group1 = \1, group2 = \3, label = *p = 0.003, y.position = 135 )
rr ba12<-ggplot(newdat12, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+mynamestheme+stat_pvalue_manual(pvla12, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba12
#Week 48 - Bray-Curtis
rr newdat12b<-read.csv(/t12fg_bray1.csv.csv, stringsAsFactors = TRUE) colnames(newdat12b) str(newdat12b)
newdat12b\(Group <- recode_factor(newdat12b\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat12b)
p values
rr pvla12b <- data.frame( group1 = \1, group2 = \3, label = *p = 0.003, y.position = 1.08 )
rr ba12b<-ggplot(newdat12b, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 1.2))+ labs( x=NULL, y=-Curtis distance)+mynamestheme+stat_pvalue_manual(pvla12b, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba12b
rr #Combine the two plots m12<-cowplot::plot_grid(ba12, ba12b, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m12
#Week 72
rr newdat2<-read.csv(/t18fg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE) colnames(newdat2) str(newdat2)
newdat2\(Group <- recode_factor(newdat2\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat2)
p values
rr pvla <- data.frame( group1 = \1, group2 = \3, label = *p = 0.14, y.position = 135 )
rr ba18<-ggplot(newdat2, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+mynamestheme+stat_pvalue_manual(pvla, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba18
#Week 72- Bray-Curtis
rr newdat18b<-read.csv(/t18fg_bray1.csv.csv, stringsAsFactors = TRUE) colnames(newdat18b) str(newdat18b)
newdat18b\(Group <- recode_factor(newdat18b\)Group, AZM= \1Â , Placebo=\2, Bewtween_group_matrix = \3Â ) str(newdat18b)
p values
rr pvla18b <- data.frame( group1 = \1, group2 = \3, label = *p = 0.20, y.position = 1.08 )
rr ba18b<-ggplot(newdat18b, aes(y=Values, x=Group, colour=Group)) + geom_violin(aes(fill=Group,colour=NULL))+geom_boxplot(aes(fill=Group, colour=NULL), width=.1, fill=, outlier.colour = )+coord_cartesian(ylim = c(0, 1.2))+ labs( x=NULL, y=-Curtis distance)+mynamestheme+stat_pvalue_manual(pvla18b, label = ,size = 7, tip.length = 0)+theme(legend.position = )+ scale_fill_manual(values=c(#A087BC, #FFF468, ))+ scale_x_discrete(labels=c(, , & Placebo)) ba18b
rr #Combine the two plots m18<-cowplot::plot_grid(ba18, ba18b, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m18
#Combine all- AZM and placebo
rr all<-cowplot::plot_grid(m1, m12, m18, nrow = 3, ncol = 1, scale = .8, vjust=c(2.0,1.2,1.2), hjust=c(-5.3,-5.5,-5.5), labels = c(, 48, 72), label_size = 30,label_fontfamily = ) all
ggsave(_all_labels13thDec2021.pdf, all, width = 50, height = 50, units = )
#P value correction for multiple testing AZM only
rr #P value correction #AZM at all visits Aitchison only
pa<-c(0.002, 0.002,0.56) p.adjust(pa, method=, n=length(pa)) #[1] 0.004 0.004 0.560
#P value correction #AZM at all visits Bray-Curtis only
pb<-c(0.001, 0.001,0.03) p.adjust(pb, method=, n=length(pb)) #[1] 0.002 0.002 0.030
#—AZM only—– #Baseline and 48 weeks
rr #—————AZM baseline and 48 weeks- Aitchison——————————- datazm012A<-read.csv(/azm012pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datazm012A)
[1] \Visit\ \Values\ \Arm\
rr str(datazm012A)
'data.frame': 42486 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\12m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 54.5 43.1 31 38.7 30.7 ...
$ Arm : Factor w/ 1 level \AZM\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datazm012A)
Visit Values Arm
0m :10585 Min. : 8.352 AZM:42486
12m :10585 1st Qu.: 33.959
Bewtween_group_matrix:21316 Median : 41.201
Mean : 43.597
3rd Qu.: 50.644
Max. :126.538
rr #Manually assigning p values pv012A <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.004, y.position = 128 )
#Figure bc012A<-ggplot(datazm012A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 140))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv012A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#E1D0FF, #8662BD, ))+ scale_x_discrete(labels=c(, 48, & Week 48))+ theme(legend.position = ) bc012A
rr
#Combine the two plots m012<-cowplot::plot_grid(bc012A, bc012, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m012
ggsave(012AZM_beta13thDec.pdf, m012, width = 40, height = 25, units = )
#Week 48 and 72- AZM only
rr
#scale_fill_manual(values=c(#E1D0FF, #8662BD, #46019B))
#—————–AZM 48 and 72 weeks-Bray-Curtis———————– datazm1218<-read.csv(/azm1218pfg_bray1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datazm1218)
[1] \Visit\ \Values\ \Arm\
rr str(datazm1218)
'data.frame': 26796 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \12m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 0.427 0.322 0.462 0.338 0.775 ...
$ Arm : Factor w/ 1 level \AZM\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datazm1218)
Visit Values Arm
12m : 6670 Min. :0.03149 AZM:26796
18m : 6670 1st Qu.:0.40606
Bewtween_group_matrix:13456 Median :0.50754
Mean :0.53163
3rd Qu.:0.64083
Max. :0.99804
rr #Manually assigning p values pv1218 <- data.frame( group1 = \12m, group2 = _group_matrix, label = *p = 0.002, y.position = 1.05 )
#Figure bc1218<-ggplot(datazm1218, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 1.15))+ labs( x=NULL, y=-Curtis distance)+ mynamestheme+ stat_pvalue_manual(pv1218, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#8662BD, #32224A, ))+ scale_x_discrete(labels=c(48, 72,48 & 72Â ))+ theme(legend.position = ) bc1218
rr
#—————AZM 48 and 72 weeks- Aitchison——————————- datazm1218A<-read.csv(/azm1218pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datazm1218A)
[1] \Visit\ \Values\ \Arm\
rr str(datazm1218A)
'data.frame': 26796 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \12m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 37.1 30.7 53.8 25.5 24.1 ...
$ Arm : Factor w/ 1 level \AZM\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datazm1218A)
Visit Values Arm
12m : 6670 Min. : 9.24 AZM:26796
18m : 6670 1st Qu.: 33.72
Bewtween_group_matrix:13456 Median : 40.79
Mean : 42.88
3rd Qu.: 49.86
Max. :117.11
rr #Manually assigning p values pv1218A <- data.frame( group1 = \12m, group2 = _group_matrix, label = *p = 0.004, y.position = 128 )
#Figure bc1218A<-ggplot(datazm1218A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 140))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv1218A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#8662BD, #32224A, ))+ scale_x_discrete(labels=c(48, 72, 48 & 72))+ theme(legend.position = ) bc1218A
rr
#Combine the two plots m1218<-cowplot::plot_grid(bc1218A, bc1218, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m1218
ggsave(1218AZM_beta13thDec2021.pdf, m1218, width = 40, height = 25, units = )
rr NA NA NA
rr
#scale_fill_manual(values=c(#E1D0FF, #8662BD, #46019B))
#—————–AZM 48 and 72 weeks-Bray-Curtis———————– datazm018<-read.csv(/azm018pfg_bray1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datazm018)
[1] \Visit\ \Values\ \Arm\
rr str(datazm018)
'data.frame': 26335 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 0.818 0.376 0.436 0.572 0.479 ...
$ Arm : Factor w/ 1 level \AZM\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datazm018)
Visit Values Arm
0m : 6555 Min. :0.01698 AZM:26335
18m : 6555 1st Qu.:0.40672
Bewtween_group_matrix:13225 Median :0.52535
Mean :0.54428
3rd Qu.:0.67601
Max. :0.99404
rr #Manually assigning p values pv018 <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.03, y.position = 1.05 )
#Figure bc018<-ggplot(datazm018, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 1.15))+ labs( x=NULL, y=-Curtis distance)+ mynamestheme+ stat_pvalue_manual(pv018, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#E1D0FF, #32224A, ))+ scale_x_discrete(labels=c(, 72, & Week 72))+ theme(legend.position = ) bc018
rr
#—————AZM 48 and 72 weeks- Aitchison——————————- datazm018A<-read.csv(/azm018pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datazm018A)
[1] \Visit\ \Values\ \Arm\
rr str(datazm018A)
'data.frame': 26335 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 52.1 22.4 29.3 50.2 54 ...
$ Arm : Factor w/ 1 level \AZM\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datazm018A)
Visit Values Arm
0m : 6555 Min. : 9.529 AZM:26335
18m : 6555 1st Qu.: 33.216
Bewtween_group_matrix:13225 Median : 40.418
Mean : 42.936
3rd Qu.: 49.553
Max. :123.869
rr #Manually assigning p values pv018A <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.56, y.position = 128 )
#Figure bc018A<-ggplot(datazm018A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 140))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv018A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#E1D0FF, #32224A, ))+ scale_x_discrete(labels=c(, 72, & Week 72))+ theme(legend.position = ) bc018A
rr
#Combine the two plots m018<-cowplot::plot_grid(bc018A, bc018, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m018
ggsave(018AZM_beta13thDec2021.pdf, m018, width = 40, height = 25, units = )
rr NA NA
#Combine all- AZM only
rr all_azm<-cowplot::plot_grid(m012, m1218, m018, nrow = 3, ncol = 1, scale = .8, vjust=c(2.0,1.2,1.2), hjust=c(-1.5,-1.95,-1.5), labels = c(vs Week 48 (AZM), 48 vs 72 (AZM), vs Week 72 (AZM)), label_size = 30,label_fontfamily = ) all_azm
ggsave(_ONLY_all_labels13thDec.pdf, all_azm, width = 50, height = 50, units = )
#—Placebo only—– #P value correction for multiple testing Placebo only only
rr #P value correction #AZM at all visits Aitchison only
pa<-c(0.33, 0.70,0.17) p.adjust(pa, method=, n=length(pa)) #[1] 0.66 0.70 0.51
#P value correction #AZM at all visits Bray-Curtis only
pb<-c(0.51, 0.33,0.28) p.adjust(pb, method=, n=length(pb)) #[1] 0.51 0.51 0.51
#Baseline and 48 weeks
rr #Placebo only
Warning messages:
1: In readChar(file, size, TRUE) : truncating string with embedded nuls
2: In readChar(file, size, TRUE) : truncating string with embedded nuls
3: In readChar(file, size, TRUE) : truncating string with embedded nuls
4: In readChar(file, size, TRUE) : truncating string with embedded nuls
5: In readChar(file, size, TRUE) : truncating string with embedded nuls
6: In readChar(file, size, TRUE) : truncating string with embedded nuls
7: In readChar(file, size, TRUE) : truncating string with embedded nuls
8: In readChar(file, size, TRUE) : truncating string with embedded nuls
9: In readChar(file, size, TRUE) : truncating string with embedded nuls
10: In readChar(file, size, TRUE) : truncating string with embedded nuls
rr #scale_fill_manual(values=c(#fff9ae, #dab600, #46019B))
#—————–Placebo baseline and 48 weeks -Bray- Curtis———————– datPlacebo012<-read.csv(/Placebo012pfg_bray1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo012)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo012)
'data.frame': 40755 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\12m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 0.657 0.745 0.824 0.721 0.104 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo012)
Visit Values Arm
0m :10153 Min. :0.01376 Placebo:40755
12m :10153 1st Qu.:0.42545
Bewtween_group_matrix:20449 Median :0.55729
Mean :0.57597
3rd Qu.:0.73477
Max. :1.00000
rr #Manually assigning p values pv012 <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.51, y.position = 1.05 )
#Figure bc012<-ggplot(datPlacebo012, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 1.15))+ labs( x=NULL, y=-Curtis distance)+ mynamestheme+ stat_pvalue_manual(pv012, label = ,size = 7,tip.length = 0.0)+ scale_fill_manual(values=c(#fff9ae, #dab600, ))+ scale_x_discrete(labels=c(, 48, & Week 48))+ theme(legend.position = ) bc012
rr #—————Placebo baseline and 48 weeks- Aitchison——————————- datPlacebo012A<-read.csv(/Placebo012pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo012A)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo012A)
'data.frame': 40755 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\12m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 39.9 49 68.5 65.5 14.2 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo012A)
Visit Values Arm
0m :10153 Min. : 6.017 Placebo:40755
12m :10153 1st Qu.: 34.710
Bewtween_group_matrix:20449 Median : 42.894
Mean : 45.421
3rd Qu.: 53.316
Max. :133.657
rr #Manually assigning p values pv012A <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.66, y.position = 138 )
#Figure bc012A<-ggplot(datPlacebo012A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv012A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#fff9ae, #dab600, ))+ scale_x_discrete(labels=c(, 48, & Week 48))+ theme(legend.position = ) bc012A
rr
#Combine the two plots m012<-cowplot::plot_grid(bc012A, bc012, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m012
ggsave(012Placebo_beta13thDec2021.pdf, m012, width = 40, height = 25, units = )
#Week 48 and 72- Placebo only
rr
#scale_fill_manual(values=c(#fff9ae, #dab600, #46019B))
#—————–Placebo 48 and 72 weeks-Bray-Curtis———————– datPlacebo1218<-read.csv(/Placebo1218pfg_bray1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo1218)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo1218)
'data.frame': 24090 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \12m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 0.603 0.516 0.281 0.979 0.445 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo1218)
Visit Values Arm
12m : 5995 Min. :0.01305 Placebo:24090
18m : 5995 1st Qu.:0.42965
Bewtween_group_matrix:12100 Median :0.58323
Mean :0.59007
3rd Qu.:0.75923
Max. :1.00000
rr #Manually assigning p values pv1218 <- data.frame( group1 = \12m, group2 = _group_matrix, label = *p = 0.51, y.position = 1.05 )
#Figure bc1218<-ggplot(datPlacebo1218, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 1.15))+ labs( x=NULL, y=-Curtis distance)+ mynamestheme+ stat_pvalue_manual(pv1218, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#dab600, #554904, ))+ scale_x_discrete(labels=c(48, 72,48 & 72Â ))+ theme(legend.position = ) bc1218
rr
#—————Placebo 48 and 72 weeks- Aitchison——————————- datPlacebo1218A<-read.csv(/Placebo1218pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo1218A)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo1218A)
'data.frame': 24090 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \12m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 34.9 35.7 41.1 61.8 37.5 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo1218A)
Visit Values Arm
12m : 5995 Min. : 6.017 Placebo:24090
18m : 5995 1st Qu.: 33.316
Bewtween_group_matrix:12100 Median : 40.742
Mean : 42.860
3rd Qu.: 50.083
Max. :117.128
rr #Manually assigning p values pv1218A <- data.frame( group1 = \12m, group2 = _group_matrix, label = *p = 0.70, y.position = 138 )
#Figure bc1218A<-ggplot(datPlacebo1218A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv1218A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#dab600, #554904, ))+ scale_x_discrete(labels=c(48, 72, 48 & 72))+ theme(legend.position = ) bc1218A
rr
#Combine the two plots m1218<-cowplot::plot_grid(bc1218A, bc1218, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m1218
ggsave(1218Placebo_beta13thDec2021.pdf, m1218, width = 40, height = 25, units = )
rr NA NA NA
rr
#scale_fill_manual(values=c(#fff9ae, #dab600, #46019B))
#—————–Placebo 48 and 72 weeks-Bray-Curtis———————– datPlacebo018<-read.csv(/Placebo018pfg_bray1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo018)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo018)
'data.frame': 24976 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 0.657 0.581 0.481 0.498 0.703 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo018)
Visit Values Arm
0m : 6216 Min. :0.02508 Placebo:24976
18m : 6216 1st Qu.:0.43141
Bewtween_group_matrix:12544 Median :0.56986
Mean :0.57820
3rd Qu.:0.73365
Max. :0.99906
rr #Manually assigning p values pv018 <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.51, y.position = 1.05 )
#Figure bc018<-ggplot(datPlacebo018, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 1.15))+ labs( x=NULL, y=-Curtis distance)+ mynamestheme+ stat_pvalue_manual(pv018, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#fff9ae, #554904, ))+ scale_x_discrete(labels=c(, 72, & Week 72))+ theme(legend.position = ) bc018
rr
#—————Placebo 48 and 72 weeks- Aitchison——————————- datPlacebo018A<-read.csv(/Placebo018pfg_CLR_euclidean1.csv.csv, stringsAsFactors = TRUE, row.names = 1) colnames(datPlacebo018A)
[1] \Visit\ \Values\ \Arm\
rr str(datPlacebo018A)
'data.frame': 24976 obs. of 3 variables:
$ Visit : Factor w/ 3 levels \0m\,\18m\,\Bewtween_group_matrix\: 1 1 1 1 1 1 1 1 1 1 ...
$ Values: num 39.9 56.7 35.1 58 64.5 ...
$ Arm : Factor w/ 1 level \Placebo\: 1 1 1 1 1 1 1 1 1 1 ...
rr summary(datPlacebo018A)
Visit Values Arm
0m : 6216 Min. : 6.911 Placebo:24976
18m : 6216 1st Qu.: 34.608
Bewtween_group_matrix:12544 Median : 42.537
Mean : 44.729
3rd Qu.: 52.378
Max. :120.050
rr #Manually assigning p values pv018A <- data.frame( group1 = \0m, group2 = _group_matrix, label = *p = 0.51, y.position = 138 )
#Figure bc018A<-ggplot(datPlacebo018A, aes(y=Values, x=Visit, colour=Visit)) + geom_violin(aes(fill=Visit,colour=NULL))+ geom_boxplot(aes(fill=Visit, colour=NULL), width=.1, fill=, outlier.colour = )+ coord_cartesian(ylim = c(0, 150))+ labs( x=NULL, y=distance)+ mynamestheme+ stat_pvalue_manual(pv018A, label = ,size = 7, tip.length = 0.0)+ scale_fill_manual(values=c(#fff9ae, #554904, ))+ scale_x_discrete(labels=c(, 72, & Week 72))+ theme(legend.position = ) bc018A
rr
#Combine the two plots m018<-cowplot::plot_grid(bc018A, bc018, nrow = 1, ncol = 2, scale = .9, vjust=1.5, labels = c(, ), hjust =-0.9, label_size = 22, label_fontfamily = , label_fontface = , label_colour = blue) m018
ggsave(018Placebo_beta13thDec2021.pdf, m018, width = 40, height = 25, units = )
rr NA NA
#Combine all- Placebo only
rr all_Placebo<-cowplot::plot_grid(m012, m1218, m018, nrow = 3, ncol = 1, scale = .9, vjust=c(1.1,1.2,1.2), hjust=c(-1.25,-1.69,-1.25), labels = c(vs Week 48 (Placebo), 48 vs 72 (Placebo), vs Week 72 (Placebo)), label_size = 30,label_fontfamily = ) all_Placebo
ggsave(_ONLY_all_labels13thDec2021.pdf, all_Placebo, width = 50, height = 50, units = )